#include <iostream>
    float startTemp = 0;
    float stopTemp = 1100000;
    float stepTemp = 1.1;
    float numberLoop = 0;
    int numberOfExamp = 3;
    int counter = 0;

int main (int argc, const char* argv[])
{
/*	std::cout << "Enter the number of example: ";
	std::cin >> numberOfExamp;
	std::cout << "start temperature: ";
    std::cin >> startTemp;
    std::cout << "stop  temperature: ";
    std::cin >> stopTemp;
    std::cout << "step  temperature: ";
    std::cin >> stepTemp;

    std::cout.width (14);
    std::cout << std::right <<"celsius";
    std::cout.width (14);
    std::cout << std::right << "fahrenheit" << std::endl;
    std::cout.width (28);
    std::cout << "celsius";
    std::cout.width (14);
    std::cout << std::right << "fahrenheit" << std::endl;
*/
	switch (numberOfExamp){
	case 1:
          numberLoop = (stopTemp-startTemp)/stepTemp;
          for (int i = 0; i < numberLoop + 1; ++i){
               if ((i >= 0 && i < 5 ) || (i > (numberLoop - 4))){
               std::cout.width (14);
               std::cout.precision(2);
               std::cout <<  std::fixed	 <<  5.0/9.0*(startTemp-32);
               std::cout.width(14);
               std::cout << startTemp;
               std::cout.width(14);
               std::cout << 32+9.0/5.0*startTemp << std::endl;
               startTemp += stepTemp;
               } else {
        	           std::cout.width(14); std::cout << "...";
                       std::cout.width(14);
                       std::cout << "...";
                       std::cout.width(14);
                       std::cout << "..." << std::endl;
                       startTemp += stepTemp;
                      } ++counter;
          }std::cout << "The program loop made " << counter << " iterations." << std::endl;

    break;
	case 2:
        numberLoop = ((stopTemp-startTemp)/stepTemp);
        for (int i = 0; i < numberLoop; ++i){
             std::cout.width (14);
             std::cout.precision(2);
             std::cout <<  std::fixed <<  5.0/9.0*(startTemp-32);
             std::cout.width(14);
             std::cout << startTemp;
             std::cout.width(14);
             std::cout << 32+9.0/5.0*startTemp << std::endl;
             startTemp += stepTemp;
             ++counter;
             }std::cout << "The program loop made " << counter << " iterations." << std::endl;
    break;
	case 3:
        numberLoop = ((stopTemp-startTemp)/stepTemp)+1;
        for (int i = 0; i <= numberLoop; ++i){
             if ((i >= 0 && i < 5 ) || (i >= (numberLoop - 5))){
             std::cout.width (14);
             std::cout.precision(2);
             std::cout <<  std::fixed	 <<  5.0/9.0*(startTemp-32);
             std::cout.width(14);
             std::cout << startTemp;
             std::cout.width(14);
             std::cout << 32+9.0/5.0*startTemp << std::endl;
             startTemp += stepTemp;
             }  else
                if (i == 6 ){
      	            std::cout.width(14); std::cout << "...";
                    std::cout.width(14);
                    std::cout << "...";
                    std::cout.width(14);
                    std::cout << "..." << std::endl;
                    startTemp += stepTemp;
                }++counter;
         }std::cout << "The program loop made " << counter << " iterations." << std::endl;
        break;

    } //switch

}
